import echarts from 'echarts';
// 引入柱状图
import 'echarts/lib/chart/bar';
// 引入提示框和标题组件
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';
import storageApi from '../../../core/storage/storage';

function statsNumController($rootScope, $scope, homeStatsService) {
  'ngInject';

  // 统计
  this.queryStatsNum = () => {
    homeStatsService
      .getStatsNum({ orgId: $rootScope.orgId || storageApi.get('orgId') })
      .then((res) => {
        if (res.success) {
          this.statsNum = res.data;
        }
      });
  };

  this.queryStatsNum();
}

export default statsNumController;
